package com.dubito.room.repository

import androidx.lifecycle.LiveData
import com.dubito.room.dao.WordDao
import com.dubito.room.entity.Word

/**
 * @author by liliang on 2020/6/17 11:03 AM
 */
class WordRepository(private val wordDao: WordDao) {

    val allWords: LiveData<List<Word>> = wordDao.getAlphabetizedWords()

    suspend fun insert(word: Word) {
        wordDao.insert(word)
    }
}